package com.youyou.fusheng2.Utils;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;

/**
 * @author: object
 * @date: 2020/4/4
 */
public class Shaper {


    public static void Save(Boolean flage, Context context) {
        @SuppressLint("WrongConstant")
        SharedPreferences sharedPreferences = context.getSharedPreferences("FLAGE", Context.MODE_APPEND);
        SharedPreferences.Editor editor = sharedPreferences.edit();
        editor.putBoolean("Flage", flage);
        editor.apply();
    }


    public static boolean Get(Context context){
        SharedPreferences sharedPreferences= context.getSharedPreferences("FLAGE", Context.MODE_PRIVATE);
        boolean userId=sharedPreferences.getBoolean("Flage",false);
        if (!userId){
            return false;
        }else {
            return true;
        }
    }

}
